<template lang="html">
    <div id="temp">
        <h4 v-text="info.title"></h4>
        <hr>
        <p v-html="info.content"></p>
    </div>
</template>
<script type="text/ecmascript-6">

    export default {
        data(){
            return {
                id:0,
                info:{}
            }
        },
        created(){
            this.id = this.$route.params.id;
            this.getinfo();
        },
        methods:{
            getinfo(){
                var url = 'http://182.254.146.100:8899/api/goods/getdesc/'+this.id;
                this.$http.get(url).then(function(response){
                    var data = response.body;
//                    console.log(data);
                    // if(data.status !=0){
                    // 	Toast(data.message);
                    // 	return
                    // }
                    this.info = data.message[0];
                })
            }
        }

    }
</script>
<style scoped>

</style>